package Model;

import java.util.HashMap;


public class World_Table {

    private HashMap<String, World> _network;

    public World_Table(HashMap<String, World> network) {
        _network = network;
    }

    public World_Table() {}

//Aquests son un pont directe als metodes de HashMap
    public boolean put(String name, World world) {
        try{
            _network.put(name, world);
            return true;
        }catch(Exception e){
            return false;
        }
    }

    public World get(String name) {
        return _network.get(name);
    }

    public boolean isEmpty() {
        return _network.isEmpty();
    }

    public int size() {
        return _network.size();
    }
//
}
